from django.db import models
from django.contrib.auth.models import AbstractUser


class UserModel(AbstractUser):
    mobile = models.CharField(max_length=11, unique=True, verbose_name='手机号')
    # 头像
    avatar = models.ImageField(upload_to='avatar/%Y/', null=True, verbose_name='个人头像')
    nikename = models.CharField(max_length=50, default="", null=True, verbose_name='用户昵称')

    class Meta:
        db_table = 'd_users'
        verbose_name_plural = '用户信息'
